package 例子.配置;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import 例子.I常量;
import 例子.甜点.I饭后甜点;
import 例子.甜点.冰淇淋;
import 例子.甜点.曲奇饼;
import 例子.甜点.蛋糕;

@Configuration
//@ComponentScan(basePackageClasses = {I饭后甜点.class})
public class 饭后甜点Conf {

    @Bean
    @Primary
    public I饭后甜点 get冰淇淋(){
        return new 冰淇淋();
    }

    @Bean
    @Qualifier(I常量.最喜欢的饭后甜点名)
    public I饭后甜点 get曲奇饼(){
        return new 曲奇饼();
    }

    @Bean
    @Qualifier(I常量.第二喜欢的饭后甜点名)
    public I饭后甜点 get蛋糕(){
        return new 蛋糕();
    }

}
